package leetcode.easy.limit400;

public class No344 {

    public static void main(String[] args) {
        char[] s = {'h','e','l','l','o'};
        No344 no344 = new No344();
        no344.reverseString(s);
        System.out.println(s);
    }
    public void reverseString(char[] s) {
        int left = 0;
        int right = s.length - 1;
        while (left < right) {
            char temp = s[left];
            s[left] = s[right];
            s[right] = temp;
            left++;
            right--;
        }
    }
}
